Fixed breakage in Firefox 2

Firefox 2 installs avim.js too many times inside a browser window. It also throws an exception when simply trying to access location.hostname in about:blank.