Approximating Hamiltonian dynamics with the Nystr\"om method