Add support for IE8
Merge pull request #2 from wayferer/master

Add support for IE8
Tidied up code after merging IE8 changes in