Fixed issues related to dynamic library name, Tested on mac os and working