Fix unit test failures on Windows platform