make sure that 'OC_Theme' exists before checking if the method exists
Merge pull request #9640 from owncloud/fix_9627

make sure that 'OC_Theme' exists before checking if the method exists