make downloadrlibs.sh compatible with linux