Existence of periodic solutions for second-order Hamiltonian systems with asymptotically linear conditions