base64 c implementation