Ayabonga Khaka’s remarkable bowling performance helped South Africa secure a narrow victory over New Zealand in the first ODI.