I'm using G++ 4.7. I figured out that this and #12 occurs only when -std=c++11 flag is passed. Without it, WIN32 and _stricmp is defined. Changing it to gnu++11 also solves both problems, so now I think it's portability isue, but not critical.
OK, I've checked in something that gets rid of the case-insensitive comparisons. It was old stuff that I copied from the GL SDK and is unnecessary here. Extension names have to be named correctly, even in case, so there's no point in a case-insensitive string compare.