Boeing takes almost $5bn hit by 737 Max grounding