Changed linking order: -pthread -> back.
Otherwise error:
/usr/bin/ld: /usr/local/lib/libgflags.a(gflags.cc.o): undefined reference to symbol 'pthread_rwlock_wrlock@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
change -lpthread to -pthread in linking

Compilation flags is already there
Merge pull request #1179 from ducha-aiki/fix_pthread_link

[fix] put pthread last in order for gflags