Make it work on NetBSD