delay import of matplotlib, closes #19
fix lbfgs wrapper handling of gradients