Improved handling of gsl dependencies