Improve compatibility of Twitter reverse-auth

Our client is using Ubuntu 12.04 LTS in production and therefore I have modified the twitter reverse-auth logic to avoid PHP functionality which is not available in that environment.

Tested successfully in that environment and in PHP 5.4.24 on OS X.