[tools] more pbc_to_exe fixup for unistd.h with --optimize

Only _WIN32 has no unistd.h. Should close #1117