Ibn Khaldun: A Reinterpretation