Fix compatibility with PHP 5.2. in rcube_imap_generic (#1490115)