Added in ES6 shim to support a wider range of browsers.