fixes to make it packagable with py2app