Fix bug related to tinyMCE support

Existence of tinyMCE var was assumed, causing problems when it
wasn't found. Fixed with "typeof tinyMCE != 'undefined'" check.