Securing Distance Measurement Against Physical Layer Attacks