Previously we allowed this definition to persist outside our header.
This would cause conflicts across multiple such headers because the name
was always the same. Fix this by avoiding the definition altogether.
Instead of running many small tests with many cmake projects, simply
compare the generated export header against a reference.
Remove the helper macros and the try_compiles which are duplicates
of the library build tests.