merged with Adapted base64 to older versions of boost