NetBSD build fixes

Buildfixes from master that are required for building
heimdal-1-5-branch on NetBSD.
Merge pull request #58 from pettai/heimdal-1-5-branch

NetBSD build fixes