[runtime] Fix the PLATFORM_GNU check so it works with gnueabi etc. as well. Fixes #21520.