Fix custom build tests on windows