Nonlinear susceptibility ofH2andD2accurately measured over a wide range of wavelengths