GAUGE INVARIANCE OF THE HARTREE-FOCK APPROXIMATION