cmake: link pthreads libraries

 - fix build error on Archlinux
 - re #740
Merge pull request #742 from gusano/link_pthreads_libs

cmake: link pthreads libraries