Fix error on Vim < 7.4; performance improvements