Fixes for Library Mode Builds