fix win32 port

And also revert the lazily load pthread.
It seems that win32 luajit cannot resolve symbols recursively from dynamically linked
libraries like in the linux. So that we do need to get platform specific pthread
libraries in different platforms. So does the mupdf library.