I've just tried to compile agent on Centos 7, it was successful. I used https://netxms.org/download/releases/4.4/netxms-4.4.1.tar.gz source archive.
I used the following commands (mariadb and postures stuff of cource are not needed for agent)
yum install make libtool gcc gcc-c++ mariadb-devel postgresql-devel pcre-devel expat-devel sqlite-devel openssl-devel libcurl-devel zlib-devel libssh-devel mosquitto-devel
./configure --prefix=/opt/netxms --with-agent
make
make install