Detect libnames with .so.<.digit>$ and use them unchanged.

This allows things like "is native('libncurses.so.5')" which would previously attempt to load libncurses.so.5.so.