Fix UTF-16 BOM detection