Fix compilation when --enable-hetorogeneous