Replacement for pthread_cond in Windows