Repair some windows compilation errors