Pakistan humble Proteas by 49 runs to keep semis hopes alive