Fixes to work on xbmc.