Periodic solutions of second order Hamiltonian systems