Modular polyfill for substr(-1) for IE browsers