Merge pull request #2904 from krytarowski/netbsd-support-5