France hold on to end their five-match losing run against South Africa at Stade de France with an enthralling 21-19 victory in Paris.