make: improve failing RIOT_VERSION

- make RIOT_VERSION fail-safe
- add RIOTBASE to UNKNOWN RIOT_VERSION