Boeing records $3.5 billion charge as 787 problems mount