runtime loader: Add support for $ORIGIN in rpath

Like in Linux it resolves to the directory of the shared object whose
needed library is to be loaded.