Fixed indexOf compatibility with IE<8

Partly fix for issue #7. Instead of native Array.indexOf now either the
native function or a simple replacement will be used.
Also added a demo.html