A new method for the calculation of vibrational force constants. Application to H2