Merge "Fix compile error with --enable-ans + --enable-accounting" into nextgenv2