THRIFT-2594 JS Compiler: Single quotes are not being escaped in constants.

Patch: Thomas Lazar