New Zealand head coach Ian Foster credited the South African defence as the main reason for their Rugby Championship victory.