fix looping through hash object in IE8 (indexOf is a property of object)