Fix Linux build.

Add missing include files and remove outdated functions from OS-specific code.
Instead of putting a dummy unistd.h on the include path, disable its inclusion the right way.
Merge pull request #40 from zeux/linux-fix

Fix Linux build.