Fixing a build problem with -lpthread and -ldl in Linux.