Don't crash when checking the BOM on Unicode lines, with Python 2