Fix bert base64 encoding and tests on ie8