Measurement of the nuclear magnetic dipole moments of 177Hf and 179Hf with the atomic beam magnetic resonance method