improve supporting shared library, add install targets (fix #20)

Many thanks to Richard Shaw <hobbes1096@gmail.com>
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>