Cygwin compatibility - tested with GCC 4.7.3 on Cygwin 1.7.25)
MSVC compatibility
Merge pull request #18 from ncorgan/compatibility_20131020

Compatibility 20131020 - thanks ncorgan!