Added a JS polyfill