Fix some build issues after rebase, and dynamically load appropriate Base64 encoder/decoder