debuginfo: Improve GDB version handling in compiletest tool