Makefiles: Add additional automatic host detection.

Adds auto-detect for FreeBSD and MacOSx.
Ronnie Dilli, Jung-uk Kim.