FFI: Improve ld script detection in ffi.load().