Token::toJSON, Tokens::toJSON - backward compatibility for PHP5.3