Fix output buffering on stdout.