Fix build failures on Windows by WMayer

Patch request from WMayer to fix build failures on Windows.