Use a more robust parallelism detection