Fixes to static linking and the emitter module