Fixed mem_ostream::get_shared_buffer()

Creating  shared_buffer with shared data of mem_ostream::buf  instead of copying them into a new buffer.