Fix more warnings/unitialized memory errors.
Make the MONO_DISABLE_SHARED_AREA env variable actually work. Fixes #12655.