nine: replace ulimit with sysconf call
__UL_GETOPENMAX seems to be glibc specific and not portable. In glibc’s sysdeps/posix/ulimit.c it is assigned the return value of sysconf(_SC_OPEN_MAX). So use the latter in the first place.
Closes #5176 (closed)