optimize Base64 Encode so it is always faster than JSON.Stringify, see: http://jsperf.com/json-stringify-vs-base64-encode