The hydrogen molecule in an arbitrarily oriented magnetic field