cmake build system.

Disable PTHREADS being default on in Emscripten builds, since JavaScript/Emscripten does not yet have pthreads support.