Fix for prior patch, to build correctly under node.js, by checking more carefully to be sure we're in the browser!