Portable abstraction for dynamic libraries