Fix bug about missing typeinfo by passing c++ flags to cabal