Observer Design for a Class of Nonlinear Hamiltonian Systems