Sparse seismic imaging using variable projection