Airlines were forced to cancel, reroute or delay some flights after the airspace was closed for nearly five hours