Improve compatibility with Safari
Merge pull request #154 from dnnr/safari-compat

Improve compatibility with Safari