Fix compilation errors in latest texture-related changes

GCC and Clang complain about non-POD type passed to variadic function.