Fix for compiling on OS X