setting $pop3->tls=1 did not solve the problem. 
after setting tls=1 (won't work without ssh) Gmail sends the following greeting:
"* OK Gimap ready for requests from 67.228.xxx.xxx 4if137733fge.15"
other imap servers send "+OK <
[email protected]>"
While validating the greeting the class checks for "+OK". Gmail never sends it and so the test fails. The internal function Tokenize returns "*" for gmail however the expected return in "+OK" 
       $greeting=$this->GetLine();
       if(GetType($greeting)!="string"
           || $this->Tokenize($greeting," ")!="+OK") {
           $this->CloseConnection();
           return($this->SetError("3 POP3 server greeting was not found"));        
       }
I'm not sure what the correct fix should be for this. Is the gmail response valid ?