Fix crash on Android versions < 8
