[build] Fix for old log4cpp versions