Add polyfills for Safari