Use opaque struct instead of void * for detector type.