Extend recognition of libraries with .so.<digit>+ to .so(.<digit>+)+

This allows calling libraries named like libfoo.so.1.2.2