Adding support for IBM JDK.

+ explicitly link against libpthread and libdl
+ export ${LD_LIBRARY_PATH} from perftest.sh