Increment channel reference count on mmap copy.

Fixes #360.