Update CMakeLists.txt

Newest Ubuntu requires pthread to link (bug in cmake I think), updating it here.