He doesn't have to prove that he didn't send them ... that's the prosecution's burden. (In the U.S. ... I know nothing about Canadian law.) But a competent lawyer could figure out how to prove it: get ahold of the IP address from which the messages were sent. Oh look, it was in California! (The IP address they had was from the email address with which Klayme had registered his Kik account with the mistranscribed name.)
Also a competent lawyer would have done a scrupulous audit of the chain of reasoning that led to his client, which would have revealed the username mixup.
Why do you assume that the IP that sent the messages was recorded. They the police went after the email at least suggests that it wasn't in the data that Kik provided during the police investigation.
Also a competent lawyer would have done a scrupulous audit of the chain of reasoning that led to his client, which would have revealed the username mixup.