fix detecting GNU* systems, update #1854