[tests] fix missing prototype warnings
[CMakeLists] make CML more portable