Fix compilation in non ARC mode + other tweaking.
Fix plugin loader issue when the plugin dir is a symlink.