G20 leaders agree to avoid currency war