Move freeres function from ld.so to libc.so.