Define the Joomla version if not already defined.

Solves this issue: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33667&start=0