added inline patch to enable native dynamic library loading for lua script