Closed geodesics on non-simply-connected manifolds