avoid using syscall on netbsd, use internal libc names instead