Stuart Broad took his fourth wicket of the innings to leave South Africa 284 all out on day two of their Test match against England.