fix centos6 build failures

reported & tested by Vinson Lee.