WIP - fixing some startup errors when running in desktop

Putting this up to get some feedback from a few people.

* Why does testing global scope vars in deferred scripts throw an error, but testing the window property of same var doesn't?

* Why is mozSettings throwing errors on instantiation?

* Why does setRoamingPreference throw not a function?

/cc @kevingrandon