[MRG] Use projected gradient solver in transform to support sparse matrices

Instead of using the l-bfgs solver.

Fixes #2124.