Fix compile error on OS X