added least squares non-linear optimization libraries detection