Apply fix from http://www.pyinstaller.org/ticket/783#comment:5