added `pthread` checking to cmake config file