Fix bug on Android 4.2 with DialogFragments especially with FileDialogFragment
Externalize compatibility workarounds