Avoid all calls to libdl (or equivalent) if NO_DYNAMIC_VP is defined

The same ifdefs are already used in the corresponding constructors, so this just avoids a runtime/link time library dependency which is practically unused in this build setup.

I'm not sure if others see this as desired, or if it's better to reduce the amount of ifdefs, since linking to -ldl isn't too much of an extra burden.