A geometrical optics approximation for refraction at a planar interface between arbitrarily lossy media