Flush stdout after writeln (fixes issue #13241)

Followup to pull https://github.com/D-Programming-Language/phobos/pull/2334

Not sure if the `.flush` call should be inside a version block for DMC, since apparently this isn't an issue on other platforms.