The flight was heading towards London Heathrow when it declared a mid-air emergency