configure: move detection of Polylib after GMP.