Fix compilation errors + add missing header