fix compilation errors under 5.8