added option to set the limited memory parameter in L-BFGS