Using C lib for base64 encoding.

Why: the default b64 encoder provided by the mime lib (lua)
is flawed and crashes. I dont think it supports binary data...