Start refactoring libretro-build-common.sh - cutting down on code
duplication