Integral homology of loop groups via Langlands dual groups