The US has joined condemnation of North Korea after it tested what it says is a more advanced nuclear weapon.