Fix extension discover fails in PostgreSQL

Related tracker item:

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=29685

Related J!Platform pull request
https://github.com/joomla/joomla-platform/pull/1837