Improving Optical Metrology by Engineering the Target Environment