Fixed Base64 encode method if window doesn't have bota method