Compilation and CMake fixes

* Fix compilation on MSVC 
 * add < algorithm > (std::max was not found)
* Fix compilation on MinGW 
 * do not use MSVC flags
 * do not use MSVC pragma warning
 * use UNIX flags
 * do not use fPIC
* Fix required CMake version 
  * 2.8.8 for < Object >
* Use Object for  MinGW
* Use same cmake code for MSVC and XCode
* Remove duplication in set_target_properties
* Add component selection  (Binary, Shared, Static)