*bsd: -pthread replaced with -lc_r