The correct formulation of Gleason's theorem in quaternionic Hilbert spaces