Use the right type in size checks.
Fixed Clang warning
Document that FreeBSD might need a src.conf option for building libc++
Replace hardcoded library dependency lines with LDFLAGS.
For the BSDs adjust LDFLAGS to use libpthread for pthread_create().
Do a bit more OS detection in the Makefile

Now detects Linux and Darwin and sets appropriate options. These might
need a bit of a tweak but Works For Me!