Use polyfills for Array.isArray and Array.prototype.reduce