Added a more reliable windows environment check