Fix for usage with Polymer Platform

As well as inside of Web Components, and generally code is more correct than previous.
Also, this is a fix for https://github.com/kangax/fabric.js/issues/1712
Fix for IE
Merge pull request #1739 from nazar-pc/patch-1

Fix for usage with Polymer Platform