Replace contains with indexOf

contains is apparently only available on Firefox