Added std::basic_streambuf compatible constructor.
fix eof case in streambuf::overflow