American Airlines says pilot shortage nearly solved