Calculation of spin-orbit coupling constants in diatomic molecules with restricted Hartree—Fock wavefunctions