backend_pgf: fix str/unicode comparison errors

When python 2.x starts mixing str and unicode instances, the string comparisons in backend_pgf.py will fail. Correct this problem by using the normal comparison operators.