Fix to support IE8

Array.isArray is not supported in IE8. (http://kangax.github.io/es5-compat-table/#Array.isArray)

Replacing the use of that method with `Object.prototype.toString.call(arg) === "[object Array]";` as suggested by MDN (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#Compatibility)

Also fixed incorrect indentation.