fixed stat usage, yet core only

- defined php_stat_t as replacement for struct stat
- on _WIN64 use _fstat64