environment variable, but we want to do it for shared libraries
only. Otherwise a static library gets created as
libfoo.a.${LIBfoo_VERSION}, which is wrong.
Bug reported and patch tested by Alexandr Shadchin <alexandr DOT
shadchin AT gmail DOT com>: thanks!
While here, reword/clarify some comments to better explain what my
patches do.