South Korea's ruling party elects ex-Premier Kim as new leader