Use the flags of the parent project with regards to shared Boost

Tested on linux with cmake 2.8.11.2