add PERL_NO_GET_CONTEXT

also removed unrefed var warning in encode_rv()