Remove -ldl linkage which is incompatible with OpenBSD.

Add test suite for dlopen and dlsym.