Polyfills and shims

Polyfills and shims for ECMAScript features not natively supported in all environments.