Fix extension discover fails in PostgreSQL

Related tracker item

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=29685