Don't reference lastIndexOf before polyfilling it.