Text this: Efficient nonlinear function approximation in analog resistive crossbars for recurrent neural networks