[53] Build for Solaris

Adds the necessary code splits for GNU make and SunOS -l flags into
the CMakeLists.

Changes the pragma rules for SunOS g++ (which do not support pop)

Also adds some minor include file preprocessor branches with __sun
tests.