On the motion of a magnetized rigid body