X11-SDL texture fix originally done by koying

This was initially done as part of fix for running XBMC under X11 on a mali-based arm board by koying...
Is there anything wrong with upstreaming it?
Also removes the double include.