python 2->3 tweaks for polymer code

tested on 2.7.6 and 3.4.2 (i.e. polymer_test.py finishes)