configure: fixup build so that it's more resilient