nmsg_io: Stored reference to cb functions to fix segfault.
Merge pull request #3 from hstern/master

nmsg_io: Stored reference to cb functions to fix segfault.