Don't check for libdl if we are going to use dlfcn.c
Try to make dlfcn work for mingw32.