World powers pledge to avoid nuclear war