Check if -lcrypt is needed on GNU/kFreeBSD and GNU/Hurd

We do this by giving them the same checks as for GNU/Linux, seeing that they use
a nearly identical toolchain. See the GNU/Hurd porting guidelines[0] for
details.

opensmtpd FTBFS on GNU/kFreeBSD and GNU/Hurd without -lcrypt.

[0] http://www.gnu.org/software/hurd/hurd/porting/guidelines.html