A continuous-time learning rule for memristor-based recurrent neural networks