Three periodic solutions to an eigenvalue problem for a class of second order Hamiltonian systems