Use a more reliable check for BSDish systems.

Look for BSD defined in <sys/param.h>, rather than keeping a manual list
of BSD derivatives.