Unboundedness of solutions of a class of planar Hamiltonian systems