Existence of a closed geodesic on non-compact Riemannian manifolds with boundary