Fix PHP 5.3 compatibility

PHP 5.3 does not allow to directly access an array returned by a function call.

Should solve #6
Merge pull request #8 from owncloud/php5.3_compatibility

Fix PHP 5.3 compatibility