...G...... [ZBXNEXT-1078] fixed compilation on FreeBSD 5.x,6.x, improved coding style