A self-contained C library for Levenberg-Marquardt least-squares minimization and curve fitting