fix building on Mac OS X