Export base64 encoding function