Add libgen.h for basename on Mac