curvefit: __setstate__ for pickling creates new fitfunc on unpickling