Make texture loading work on all platforms