Fix compilation flags.

More permanent issue with boost.unit_test internal declarations.
Put it into shared cmake init since it affects several projects.