Add PY27 compatibility