Fix compilation problems on RT