Ambient-induced surface effects on InP and GaAs