In a rare move, the US and Japan jointly intervened in currency markets to prop up the yen, which had hit a 40-year low against the dollar.