Fix up the browser detection script a bit.