fix using undefined location global in node for lib/url

use `global.location` to support node and browsers
update debug dependency for browserify
Merge pull request #618 from defunctzombie/fix/url-test

Fix/url test