fix isArray function (tests pass in Firefox 3 now)