More robust loading & IE loading support.

While I respect that IE will not support the functionality provided by this module for quite some time, if ever, it is required to function for all browsers and users without error or breaking compile & minification with other libraries.

Added more robust loading support and use of window.attachEvent if window.addEventListener is not available (as in Internet Explorer).

Also do not perform WebKit scaling if the image has any sizing attributes (also an existing pull request).