Replace -pthread by -lpthread for Freebsd, too. (#475619, Roy Marples)