do key/value replacement in a through-stream

instead of PassThrough hack, which needs node 0.9+