Fix race condition when starting in Connector mode

See comment in first patch. I think this should fix all the "Don't have icon in Firefox if Zotero Standalone is started first" complaints.