backport _TARGET rule
JS_VERSION is removed
Correct versioning of installed shared library.

To be distro-friendly shared libraries should have a version suffix
that indicates ABI/API compatibility.

This was lifted from previous libname patches from the js185 release,
with only minor changes.