Fix unit tests on Windows