Add pthread to CMake sem_wait check. Fixes #53

Some systems have sem_wait in librt, some in libpthread.
This add pthread to the CMake check for semaphore support.

Released under the MIT license.