I solved it using Libdl.dlopen and Libdl.dlsym explicitly for the ccalls.
Libdl.dlopen
Libdl.dlsym
ccall