A few fixes to OAuth and REST so it works with Google's PHP Client Library