Enable building without using glibc (on some platforms)

If we use a compiler which is mostly GNU compatible, such as clang, and we are on a platform which doesn't use glibc, such as MacOS X, then we need to provide an alternative implementation of the intrinsic variable program_invocation_name which is used in the error reporting.