Variation of the transition dipole moment across the OH stretching band of water