Fix polyfill code for element.textContent