Safari Compatibility

Added polyfills and fixed dependencies