Fix test failures on Windows