American Airlines has reached a compensation deal with Boeing and will be reimbursed for the money lost due to the grounding of the 737 Max jets.