Visual studio fixes

I made these changes to make rlutil build in visual studio. This compiler still uses C90 so some of the C99 features, e.g. inline, don't work.