Long-term prediction of chaotic systems with recurrent neural networks