Add with_mem_writer removed from Rust 0.10-pre.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>