Special handling of Cwd and List::Util in configure.com.

This is a follow-up to d689efaf4740b25, where the same thing was
done to Configure.  They weren't getting into $Config{dynamic_ext}
which caused DynaLoader.t to start failing once Test::More started
requiring List::Util.

I question the wisdom of expecting dynamic loading to be working
flawlessly before we can test whether dynamic loading is working
at all.