Fix up prefix-built boost and gmp discovery.