cmake: fix exporting of targets on pre-2.8.11