Add compatibility function for outerHTML

Fixes https://github.com/owncloud/apps/issues/1075 in master. For stable5 I made a [quick fix](https://github.com/owncloud/apps/commit/ca5bd4121b05602617e7fa5f2b13caa8eaede838) but this may be useful other places.

@bartv2 @Raydiation et al