IE Compatibility

I've created some fixes to make the polyfill work with older versions of Internet Explorer, specifically back to IE7.