Fix to avoid JavaScript errors if script is loaded in IE7 or below.
Fix to avoid JavaScript errors if script is loaded in IE7 or below.

The CanVG code was assuming that the Element object is defined by the browser, but on IE < IE8 this is not the case.  This commit adds an additional check to avoid a JavaScript error if Element is not defined.  In this situation, the matchesSelector variable will end up undefined, but that is what would have happened anyway, only now it happens without throwing a JavaScript warning and probably breaking the entire script.

See also: PR #566, which fixes a different but related error that causes similar breakage in IE8 and possibly other old browsers.

Use-case: We have a JavaScript application which uses an RaphaelJS to build the UI, and we support IE back to version 7 (Raphael uses VML for older IE versions, where SVG is unavailable).  We use CanVG to allow users to save an image of the screen, if their browser is using SVG and canvas.  We detect this internally, and so the CanVG code is never run if it is not going to succeed.

However, because the tool is built into a single distributable file using Closure Compiler, we cannot selectively load CanVG for supported browsers only, therefore it is important that CanVG loads without errors on older IE versions, even those which don't support Canvas.

I have not added checks that matchesSelector is defined before it is used, as I have continued with the assumption that no CanVG code will be called in situations where it is unsupported.  This fix is purely to resolve the issue with CanVG code that is run automatically, simply by including the file.

canvg/canvg,canvg/canvg,canvg/canvg,gabelerner/canvg,canvg/canvg