Correctly get number of threads for benchmarks.
Hack to fix building Prolog from a Makefile.