[vim]: IE8 fixes.

 - avoid array .indexOf - fixes % key and non-pcre searches.
 - avoid array .map - fixes a couple of non-running tests.

vim.js should probably be rewritten to use an indexOf() shim throughout (but I don't care enough about vim nor IE to undertake that).