Calculate the base64 length correctly in rfc2047 mode