Remove redundant nested function b64_from_24bit

Move multiple definitions of the nested function b64_from_24bit into a
single function __b64_from_24bit.