Kane Williamson's big six in the final over helped guide New Zealand to victory over South Africa in the ICC World Cup.