Fixes for Unity AOT compilation