Added lpthread in TEST_LIBS

I added this line because i got the following error when I performed "make check":

  - ... undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
  - ... error adding symbols: DSO missing from command line