Fixed ToString formatter.

Before there was no difference between the results of doc.toString(true) and doc.toString(false). Now doc.toString(false) returns unformatted XML document string.