Add owncloud version to JS scope

Fix #5361
Merge pull request #7409 from owncloud/issue/5361

Add owncloud version to JS scope