Japan ditches veto in desperate bid for U.N. seat