NetBSD build fixes

Fixes (from master) that are required for building latest heimdal-1-5-branch on NetBSD.