trim() implementation for IE

Here is the pull request for your review. It seems to be working on my end although this one implements a full trim on both sides. I'm not sure if that was the intention.

I had also replaced the modified .js file in the zipped resource for reference.