Removed isPOSIX due to the mix of linux and mac os x flags.
Added Windows 8 detection.
Minor refactor.