On the harmonic oscillations of a rigid body on a free surface