fix compilation without threads