Updated for cross compiled windows builds from linux without libpthread.