The pilots' union had threatened to strike after contract talks stalled.