NDKBitmapFactory: improve the compatibility