MirBSD and NetBSD support

These changes enable using the shadow module on two more BSD flavors, NetBSD and MirBSD. Thank you.