Fix compile error on Mac OSX