Fix ownCloud for php5.3.x

fixes #6685 

@jancborchardt @bantu @icewind1991 THX