Fix build with Clang/Windows, Mac OS X, and Haiku