Minor fixes (missing ifdefs, etc.)