Adds support for old IE

This patch adds support for versions of IE <= 8 where Array.forEach and String.trim are undefined.