Check if libpthread is required or not.