Patch python’s way of querying the number of CPUs, which lead to segfaults from time to time.