minimal modifications in order to build on CentOS6