A few g++ compability fixes
(not yet compilable!)