Fixed compiling for MacOS X