Dean Elgar batted brilliantly for his century trying to save the game