Mitchell Starc equalled Glenn McGrath's record for the most wickets in a single World Cup during Australia's final group match with South Africa.