Integrability of Hamiltonian systems with gyroscopic term