Make gdb version detection more flexible.