Update main.js

To keep the code up to date to any API change, you could look at the test here: http://mxr.mozilla.org/mozilla-central/source/toolkit/webapps/tests/test_hosted_launch_no_registry.xul
Merge pull request #1 from marco-c/patch-1

Update main.js