Control of surge and pitch motions of a rectangular floating body using internal sloshing phenomena