SLIP: Learning to predict in unknown dynamical systems with long-term memory