Enhancements for building under Solaris 8 (compiler does not like ifdef in the middle of a macro, some headers are missing but can be worked around). Also made VERSION configurable with an external envvar for site-maintained packages with a unique name.