Fixes bug in indexOf when needle not found.

Also fixes same bug in lastIndexOf.