change datastream constructor so MSVC runtime doesn't assert and crash in debug mode