IE8/IE9 compatibility fixes

nice library btw - thanks.