add compatibility for safari and hopefully ie9
Merge pull request #1 from okaybenji/compatibility

add compatibility for safari and hopefully ie9