Fix for stream.cpp on windows