Make _gpgme_encode_percent_string work for memory buffers.