(libretro-build-common.sh) Some more refactoring