Fix PHP 5.3 compatibility

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