rewrite base64 incantation to be a bit clearer. fix a very poor assumption about the size of unsigned int on a 64bit system