Pakistan opt to bat first after winning toss against South Africa