converted all defined( to getDef where applicable
forgot base.php for #849