Add option to calculate derivatives using gsl