XPCOM was being initialized from a static initializer in netlib. Removed the static inializer. This will get xpcom to be initialized after main() not before it.