Small fixes for windows

Windows now builds after nomis52's changes.
On Linux it appears to be ( http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/libpthread-ddefs.html ):
typedef unsigned long int pthread_t;

So we'll need another ifdef.