Add a workaround for systems not defining PATH_MAX
Allow to compile under kFreeBSD and Hurd