Mostly fix a portability problem in $rtoi (run time)