honours --with-libdir option and avoid unwanted rpath