Fix --ignore-dynamic-linking

Use regular expressions to exclude files like "libtest.so.1.0.0" as well when ```--ignore-dynamic-linking``` is on.