A symmetric nearly preserving general linear method for Hamiltonian problems