Some extensions to make ceres solver work a little better with Eigen