Jet Blue agrees to buy Spirit Airlines