Use ES5 Array.isArray first and only fallback to Object.prototype.toString where needed