Fixed build errors on Windows