corrected for recent mesa versions

It didn't compile on recent mesa versions that take types more seriously. It was arguably not even correct before.