better gmp and cg libraries searching