fix build errors on windows