added proper OS compile flag checking