Report/XML: bug fix for output on Windows
Report/XML: bug fix for output on Windows

It looks like the `XMLWriter` extension does not respect the OS-specific `PHP_EOL` character, but always uses `\n`, though I have not been able to test this on various OS-es to confirm.
This could be regarded as a bug in PHP itself which may or may not be fixed at some point.

With the above in mind, I have created a fix which contains some redundancy, but should be stable on all OS-es, including if/when the PHP native issue would be fixed.

Alternatively, the whole snippet could be replaced by the code on line 81 of the patch.

Fixes 2526

squizlabs/PHP_CodeSniffer,jrfnl/PHP_CodeSniffer,stronk7/PHP_CodeSniffer,squizlabs/PHP_CodeSniffer,squizlabs/PHP_CodeSniffer,jrfnl/PHP_CodeSniffer,stronk7/PHP_CodeSniffer,stronk7/PHP_CodeSniffer,jrfnl/PHP_CodeSniffer