Improve support for NetBSD

Please merge these simple changes to improve support for the NetBSD OS. This also fixes #331 ("NetBSD types not necessarily set properly"). Thanks.