Fixes to external builds