update to latest lthread and fix compilation