Small cmake changes to allow export to work within sub-project builds.