Fixes for OS X (required removing -static flag and -pthreads flag, inclu...

...de endian.h)

All tests pass.  See wiki for Mac OS X installation.  Confirm that removing -static and -pthreads flags is acceptable.
Source link?