Using indexOf when detecting current environment