update Stream.{_transform,_write} for 0.9.12 API