Integrals of Motion in Time-periodic Hamiltonian Systems: The Case of the Mathieu Equation