Fix stale pointer issue in RBinELF. Add r_mem_dup