North Korea confirmed it has exploded a nuclear warhead, to protest sanctions for earlier weapons tests