CPU detection code from Mirus (adapted from code by BrynetInc)