fix build errors on Windows