Text support for CocoonJS

Adds determineFontHeightInPixels for calculating the exact height of 'gM' in a given size and font.

Calls the function if it detects CocoonJS. The normal determineFontHeight will fail since CocoonJS' accelerated mode doesn't have CSS support to calculate the correct element.offsetHeight value.