Close issue #1, console errors on extension load.

Code is now smart enough to know if it's running on node or in the
browser. (More robust checks are possible, but these seem to work.) This
means no more commenting/uncommenting lines when switching from one to
the other... which means I won't break the code for users when I
personally switch.