make ffi.load thread safe (not 100% sure but dlopen may not thread safe)