Make PyMySQL work in the package generated by py2exe

Setting the 'optimize' level to 2 was causing pymysql imports to
fail. This sets the 'optimize' level to 1 solving the issue.

This is equivalent to the change in d713b36bc for py2app.