Lufthansa agrees to sell British Midland to IAG