Fix a bug during buildAgent -d on Debian like systems