Misbah, Shafiq halt South Africa win bid