ncm-gip2: fix missing retrieval of parameters in write_encoded()

Fixes #50.