fix the compilation failure on NetBSD.