[stable7] Fix S3 connection regression

Fixes https://github.com/owncloud/core/issues/11714

All S3 unit tests passed locally for me.

@LukasReschke @icewind1991 @butonic please review