fix errors in IE 8
Merge pull request #80 from scooterw/ie_fixes

fix errors in IE 8