fix symlink issue, and use glibc mode macro