Dollar hits 40-year high versus yen