Added b64_encode_ex function implementation.