Obama slams Pak army for terror ties