Fix cpp tests on Windows