Solaris porting work: switch to using 'target_os' and 'target_cpu'
rather than 'host_...' because (a) we should be building for the
target rather than the host (though mostly they're the same), and
(b) because the values are simpler.
Also add some code to detect that we're on solaris properly,
rather than using 'uname -r' which is the fallback. This code
may not work on versions of Solaris older than 2.10, but we're
not supporting them, so...