shim Array.prototype.map where necessary