wrapped pid_t and S_ISDIR definitions into ifndef for mingw build