A hack to get working console IO with Windows GUI applications