South Africa bowled out for 308, NZ respond with 177/3