* This required a minor change to CMakeLists.txt.
* Also updated two occurrences in code where compilation failed due to
implicit narrowing conversions.
Thread id changed to size_t, required for MacOS because older versions do not have integral thread ids and we must use a pointer returned by pthread_self()/