Passing NULL for the standard handles is documented to do the right thing, but it doesn't work on Windows 7. However, passing the result of GetStdHandle does seem to work, and is recommended in this MSDN article, which specifically talks about overriding just some of the i/o handles in a new process with its own console window: https://support.microsoft.com/en-us/kb/190351 .
Can you patch this in and confirm that it still works on newer versions of Windows?
I think this would be a little better if we change the implementation of GetStdioHandle() to just return the right thing.