Fixes for building on FreeBSD 9

* normal crypt(3) is in unistd.h for most OSes. In case it isn't, it probably
  doesn't need to be declared anyway
* add a workaround for BSD make
* use cc rather than ld to probe -lcrypt, as ld complains about not finding the
  program entry point
* LD = $(CC)