provide a workaround if program_invocation_short_name is missing
Try some replacements, such as getexecname() on Solaris and __progname
on BSDs and Darwin. When not found, base program_invocation_short_name
on the source filename it is used in, as not to require argv[0] to be
passed along. This latter approach is not dynamic, but doesn't require
code changes for all places where program_invocation_short_name is used
now.
Signed-off-by: Fabian Groffen <grobian@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>