An American Airlines flight from New York City to Madrid, Spain, Wednesday had to divert to Boston after a crack developed in the Boeing 777 jet’s windshield.