Restore stdout on windows