Extended Coulomb approximation for multichannel-quantum-defect-theory computations of dipole moments: Method of calculation and application to H 2