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.