Fix compilation (on Cygwin) after commit f63dc86f, by adding the necessary includes.

No idea why this problem has not shown up on other platforms; the includes are by no means Cygwin-specific.
Merge pull request #447 from lanurmi/compile-fix-main

Fix compilation (on Cygwin), by adding the necessary includes.