fixed the passing of glog and gflags to ceres

@sleutenegger This is just some cleanup and proper passing of gflags glog to ceres build.