Add an API for least-squares spline fitting.