and MACHINE-VERSION return incorrect values on Solaris. Rewrite it to work for both unicode and non-unicode builds, thereby fixing MACHINE-TYPE and MACHINE-VERSION.