[build] linking pthread library (fix for 7fba249)

Avoid errors on some configurations:

Linking CXX executable boostcached
/usr/bin/ld: CMakeFiles/boostcached.dir/src/util/log.cpp.o: undefined
reference to symbol 'pthread_rwlock_wrlock@@GLIBC_2.2.5'
/usr/bin/ld: note: 'pthread_rwlock_wrlock@@GLIBC_2.2.5' is defined in
DSO /lib/x86_64-linux-gnu/libpthread.so.0 so try adding it to the linker
command line
/lib/x86_64-linux-gnu/libpthread.so.0: could not read symbols: Invalid
operation