Fixed some bugs, compatibility with newer jQuery

- Fixed compatibility with jQuery v1.8+ / v2+
- Fixed handling of errors for older browsers (<=IE9, <=FF3), doesn't
stop whole script