add dynamic library support