ksort.h: add 'static' to avoid linking errors
MT-Data: check return values of sem/mutex functions
build: detect Mac-OS-X in 'configure.ac'

Defines USE_MACOS_DISPTACH in 'config.h' if Mac-OS-X is detected.
Multithreading: Adapt MT code for Mac-OS-X
Merge pull request #44 from agordon/mac-fix-2

Mac fix 2