basename() called but <libgen.h> not included
Seen while packaging for alpine linux.
This compiles on GNU libc since it is not posixly strict enough in regard to header files but fails on e.g. musl or other c libraries.
The patch adresses this by using g_path_get_basename from glib instead. This may also help compilation on the *BSDs. and void linux, musl variety.