base64 encoding hack for db logging and ruby 1.9