fix NetBSD specific realpath segfault: when no path given