Check for XMLWriter class

Backport of https://github.com/owncloud/core/pull/12321
Merge pull request #12496 from owncloud/check-xml-writer-for-7

Check for XMLWriter class