Yen near 40-year lows as dollar stabilizes