include -pthread when compiling libcluster.so