Older versions of cmake (e.g. in Ubuntu 18.04) did not provide cmake modules for these libraries that also created a target. Fixes #2393