DMD compatibility fixes