adding polyfill for btoa and atob functions