Portability fixes for Linux and headless sessions

This will make package installation work on Linux, and in ssh sessions without X11 forwarding. The URL will need to be manually copy pasted into a browser, and the auth code copied back into the R session. After discussion with @craigcitro, there was no elegant way to automatically determine whether the user would want the graphical browser automatically invoked or not. For example, the user can be in a screen session with the DISPLAY env set but is now ssh-ing into the screen session so has no access to the opened browser window. Another way will be to prompt the user what he wants, which can be a future improvement.