index: Add shims for ES5 methods

Legacy JS engines don't support `Array.isArray` or `Array#map`.  This
patch implements simple shims to compensate for horribly old browsers
(IE8).