Enabled compilation on osx (mountain lion), using gcc 4.7.2.
OSX (mountain lion) changes