Add support for NetBSD. Tested on NetBSD 6.0/i386.