Small improvements to get_avail_core_count()