enabled `detect_encoding` for ruby 2