Use textContent to avoid an exception when the title element has no children.

As reported by Alan Stearns.