More rebust way to make sure we are using the actual file and matching it to a shlibs line