Fix R_HOME problem on Mac OS X