add replace option

Useful for multiple prototype inheritance like [Duplex Stream](https://github.com/joyent/node/blob/master/lib/_stream_duplex.js#L34)