Makefile: read only the major version for the gcc LTO partition check
GCC only prints a bare major number from `-dumpversion` when it was configured with `--with-gcc-major-version-only`, which the distro packages do. The official gcc docker images and toolchains built from source print the full version, so the gcc <= 13 guard from e5c99a892ed3 ends up running `test "13.5.0" -le 13`, which fails with "Illegal number" and quietly picks `-flto-partition=balanced` for exactly the compilers it was written to exclude. This takes the major number the way the clang branch already does.
Checked in the official `gcc:13` image, where `g++ -dumpversion` prints 13.5.0: `make -n build ARCH=x86-64-avx2 COMP=gcc` selects balanced on master and one with this patch, the build is clean and bench is 1559611. On gcc 16 here nothing changes.
closes https://github.com/official-stockfish/Stockfish/pull/7252
No functional change