North Korea has confirmed it has carried out a third nuclear test after monitoring agencies reported an "unusual seismic event".