Fix link error in Ubuntu Saucy

I got link error in Ubuntu Saucy as:

~~~
Linking CXX executable ../bin/tests/testOptimizer
libgtestd.so: undefined reference to `pthread_key_create'
libgtestd.so: undefined reference to `pthread_getspecific'
libgtestd.so: undefined reference to `pthread_key_delete'
libgtestd.so: undefined reference to `pthread_setspecific'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/tests/testOptimizer] Error 1
make[1]: *** [unittests/CMakeFiles/testOptimizer.dir/all] Error 2
make: *** [all] Error 2
~~~

I just changed the place of adding pthread to the libraries.