Prefer AOT compilation to weird reflection hacks.

They were preventing other libraries, eg pulsar, from working properly.