CXX-10 move *nix specific compile flags into if block