Stuart Broad and Mark Wood put on a show as the England tailenders shared a last-wicket stand of 82 off just 50 balls to frustrate South Africa.