Fix memory leak on browser as well

Adjusted the approach merged for index.js to browser.js. Fixed test so that it only runs the binary check on browsers that support binary and so that is uses the proper binary data type.