Use shlibs substitution instead of writing dependencies manually