build: Robust version checking helpers with `printf`
This commit updates the compiler version checking helpers so that they also
work under environments like Darwin. It turns out that the behavior of
`echo` can be different in different environments, while `printf` seems to
be well defined.
Signed-off-by: Simon Kuenzer <simon@unikraft.io> Reviewed-by: Alexander Jung <alex@unikraft.io> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #1034