macos: add fallback version detection

Fallback to sysctl `kern.osversion` when `kern.osproductversion` is not
available (prior to 10.13.4) .

The mapping from `sw_vers -buildVersion` to `-productVersion` is
formulaic from 10.8 to 10.15 and older is handled with switch.

closes #5119
3df0a3a528Michael Dusan committed on 4/21/2020, 10:37:03 PMparentaca6b70
2 files changedLine totals unavailable