Work around some g++ cpu detection algo bug.

should fix gh-1980