Fix crash on attempting to load non-existent module

Calling dlclose(NULL) on the error path is not so helpful.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Increase maximum size of X.509 certificate

2048 bytes isn't quite enough for my VPN certs. Ideally this should be
dynamically allocated but just increasing it to 4096 will probably suffice
for now.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>