realtime console for windows - not buffering when redirecting stdout to pipe