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

add compatibility for safari and hopefully ie9