added indexOf fallback for browsers which don't offer native support