Add support for get_total_cpus on *BSD and Solaris.