Fix build on OS X and Windows.