Fixes to work with cmake subprojects