Fix compilation of ANN with C++ compiler.