Fix compile error when compiling on OS X