Windows build fixes