browser: use `typeof` to check for `console` existence

It's a global, so we must check with typeof otherwise
an error will be thrown if `console` is undefined.
Release 2.1.1