The convict thought he was being helped by an ISIS handler when he was speaking to undercover officers