Include AUXLIBS in SHLIB_SYSLIBS

Also set RPATH for libraries and plugins

(cherry picked from commit 4e58804b7f3871fd9545880531e60a84de530a4e)