Enhance Zend\Json\Encoder to encode JsonSerializable classes