fix librelp compatibility problem with C++