Revert "Fix memory leak in Encode.xs"