Replaced ad-hoc extension loading with glad.