Base64 Encoder and Decoder shims for client-side.
Based on: https://github.com/dankogai/js-base64/