Closed orbits in nonlinear Hamiltonian systems