Patch condition variables to ensure that the cond mutex is unlocked before we try and check for interruption