Added support for dynamic linking