fix building on OS X