fix R import code for Windows