A precise measurement of the magnetic moment of the proton