Fix compilation on OSX.

Support for compiling on OSX 10.8.