core: fix compilation on Android (replace calls to rindex by strrchr) (bug #41420, patch #8301)