Fixed some things to make it build in R-Forge