Fix compilation issues in cosmo-aspect tests