Fixes library so it works with jQuery 1.7

If you try to use the plugin with jQuery 1.7 (1.7.1, 1.7.2) it will throw an exception  `Uncaught Error: NotFoundError: DOM Exception 8.`.