Fixes Windows support

Windows support has been broken due to introduction of some additional POSIX headers, multithreading and block file support. Only some small changes have been necessary to restore it.

- number of processors fetched for WIN32 using `pthread_num_processors_np()` (pthreads-w32 extension?)
- moved block file support to non-WIN32 conditional inclusion section
- conditional includes for some POSIX headers