Replace GAMMALIB_SOURCE environment variable by PACKAGE_SOURCE environment variable in unit tests and use PACKAGE_SOURCE determine in configure instead of abs_top_srcdir as the latter does not exist on older systems.
Use static functions instead of static members to avoid initialization order trouble. A smart pointer is now used for the static memory allocation so that memory gets freed correctly before exit.