Ensure that the _Generic() macro in math.h works with qualified types.

tgmath.h contains the same bugs and so should be fixed in the same way.