Use "::unknown" type casts to overcome binary protocol restrictions

Fixes #112