Japan spent almost $20bn in effort to defend tumbling yen