Phase measurements in surface nonlinear optics: The effect of laser beam quality