some NetBSD build fixes, linking still fails thow