Fix build on OS X

Also removes a Windows-specific tweak that shouldn't be needed anymore.  (But somebody should test that...)