indexOf isn't available in IE8.  Since this is a enyo glue file, you can use enyo.indexOf instead.  I should have caught this earlier when Edwin did the first version.  Same for next line.