Fix memory leak when encoding bare bignums

This fixes a leak when encoding a bare bignum. Technically it would be
possible to hit this memory leak randomly with bignums in objects but
the chances are highly unlikely.

Thanks to @miriampena for the issue.

Fixes #69