handle some quirks mode issues
IE8 and 9 do not support array-style string parsing in quirks mode: "abcdef"[0] returns "" whereas "abcdef".substr(0,1) returns "a"
document.fireEvent() returns "Invalid argument" regardless of the parameters sent to it. This happens in IE8 and IE9 in quirks mode.
change substr() to substring() for performance
a jsperf comparing the two: http://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/14
Merge pull request #123 from yola/quirks_mode_fixes

Handle some quirks mode issues