Pakistan captain stands firm as tourists close gap on Proteas’ first innings total