MinGW friendylness

This change aims to better support MinGW:
- install targets even when building a static library (let's say I want to package it, use it from a prefix)
- use the standard cmake BUILD_SHARED_LIBS option, see
http://www.cmake.org/cmake/help/v3.0/variable/BUILD_SHARED_LIBS.html
Regards,
xan.