Fix bug in KTX texture loading

Fix initialization bug in KTX texture loading function that caused
unexpected behaviour/crashes in demo7 and other demos.

Signed-off-by: Harm Hanemaaijer <fgenfb@yahoo.com>