g++ almost works on OSX