cmake: Avoid dependending on MinGW runtime DLLs.
Test texture object labels.