Replaced String.fromCharCode.apply with a loop

This will in most cases give better performance as shown in: http://jsperf.com/string-fromcharcode-apply-vs-for-loop
Also, this fixes the crash caused by String.fromCharCode.apply due to limited stack space.