Changed to chardet2 (a python3 port) if we run on python3