Changes to allow building with newer GCC - see http://forum.xda-developers.com/showthread.php?t=1980379