use -pthread option rather than CMake script
added get_command_dispatcher convenience function