use $CFLAGS and $LDFLAGS in dlopen() check