Two-time defending champions New Zealand held off a spirited South Africa to get their World Cup campaign off to a winning start.