Use sysctl for hardware detection

A cleaner version of #90 which does not throw errors on Yosemite