Effective dipole-moment operator for nonrigid H2X-type molecules. Application to H2O