Replaced Array.contains() call with Array.indexOf()

This is because of https://github.com/espruino/Espruino/issues/161