Miscellaneous fixes for s390 compilation errors