The head of Boeing has described the fatal crashes of two of its aircraft as a “defining moment” for the company.