Fixed tabletop error in IE8

The old polyfill for indexOf was not working in IE8 (returned -1 for values that were in the array). This version (copied from the Mozilla docs) works correctly.