Include Magento in setup script

There is a bug introduced in Magento 1.9 which breaks shell scripts which do not require Magento.