Humble attempt to add Cygwin support
Slightly better version based on pullrequest comments
Even more polishing plus removing some dirty hacks
Merge pull request #240 from revelon/master

Humble attempt to add Cygwin support