Attempt to fix FTBFS on non-Linux. Remove duplicate unistd.h, add missing #include <cstring>

Signed-off-by: Nick Dowell <nickdowell@gmail.com>