fix issue #171 (complie on NetBSD)