THRIFT-2165: Thrift Compiler fails at input files with UTF-8 BOM

Patch: Jens Geyer