Support both old and new HTTP closing APIs in benchmark program