On Disturbance Rejection for a Class of Underactuated Hamiltonian Systems