Fixed memory issues when encoding/decoding PKI_MEM with B64 coders