using python to check system platform instead of $OS makefile variable which detects cygwin the same as windows shell.