fix detection of OS versions