Fixes IE11

The library wouldn't work properly in IE11. This commit fixes the issues
that were preventing it from working in that browser.
Merge pull request #10 from kouiskas/patch-1

Fixes IE11