respect the gcc version when adding boost directives