Support CDH4 and CDH5 from same config