Fix for IE8

IE8 doesn't have .textContent (nor even .innerText) for text nodes, so we should determine correct property name before using it.
Merge pull request #1 from hogart/patch-1

Fix for IE8