North Korea vows end to nonaggression pacts after U.N. vote