Perl implementation of https://developers.google.com/google-apps/gmail/xoauth2_libraries