Use textContent rather than firstChild.data to avoid an exception when the title element has no children.
Merge pull request #27 from w3c/empty-title-exception

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