Sort build options before building string

This will hopefully fix tests on python 3.3