Fix the match on libdir

By default “$libdir” is “/usr/lib”, requiring a trailing “/” makes the
match fail.