Add cpu check for solaris2

This is tested on SmartOS and should work on other Illumos derivatives (as well as Oracle Solaris, though we do not have a host to test on).

/cc @sax @bixu