fix(resource): more reliable obj.forEach check

When undefined (IE8), obj.forEach === Array.prototype.forEach equals
true (undefined === undefined)
Merge branch 'pr/24'

Close #24