Updated autoconf macro to deal with RPATH better