Fix Windows build errors