fixed browser module bug

Fixes an issue where debug.js throws an uncaught error: `Uncaught ReferenceError: module is not defined` stopping all scripts from executing.

This should allow the module to be used in the browser and node without modification or other hack/workarounds.