Add include for unistd.h

This commit adds an ifdef-guarded include of unistd. Without this
included compilation fails on tested *n?x targets.