Fix compilation on Mac OS X 10.8 and eariler