victor:some workaround for older kgsl and various fixes to compilation issues