Fix compatibility with Android.