Change some hooks to use PyInstaller version detection