Fix quoting for integers and unicode data on Python 2