Normalize line endings
Use AttachConsole() in the guihead wrapper

This attaches to the parent process' console, if it has one.