make g2o optional for building