New Zealand punished first-half errors from South Africa to start their Rugby World Cup defence with a 23-13 win in Yokohama.