Fix for makefile under Cygwin

$(OS) variable under make is the same for Cygwin and windows shell. This fix allows Cygwin to be treated like the other POSIX environments by performing the platform check with python and `sys.platform`.