Ben Stokes knocked spinner Keshav Maharaj out the ground for six in the third Test between South Africa and England in Port Elizabeth.