fixes for building under el6