fix init.cpp not working on R version less than 2.16.0