add polyfills for array.reduce, array.map and array.reduceRight