OS detection in config.mk without using uname

GCC has an option -dumpmachine which provides the necessary info.