libc: Initial implementation of open_memstream.