make forEach and reduce shims slightly more compliant