Rabada bowls South Africa to 177-run win with 5-wicket haul