Import latent_client.c Windows fix from jack2 (tweaked)