Support for L-BFGS-B number of iterations for old scipy versions