The LSB header files define major() as a macro but if it is ever called
the macro references symbols not available at link time. Improve the
test for major() to actually call the macro and try to link. This
approach is based on upstream libarchive SVN commit 2866 which fixed
libarchive issue 125, submitted in response to CMake issue #11648.
Inspired-by: Tim Kientzle <kientzle@freebsd.org>