Fixed some compilation problems due to /clr