Fixed cygwin compatibility (issue #806)

Fixed platform specific issues causing cygwin build to fail.
Merge pull request #835 from rainlabs-eu/fix-cygwin-compatibility

Fixed cygwin compatibility (issue #806)