added -lpthread to LIBS so that this compiles on newer machines when RTLD_NOW is passed to dlopen