Pakistan complete their highest ODI chase to beat Proteas