fixed undifind variable in _skipBOM