Fix WOW64 registry mode on Windows 2000 (#10759)
Fix WOW64 registry mode on Windows 2000 (#10759)

CMake fails to find any registry paths on Windows 2000: according to regmon
it fails with an access denied error. I double checked all the access rights
and they are fine. After checking the access modes on MSDN I found that it
says KEY_WOW64_32KEY / KEY_WOW64_64KEY are not supported on Windows 2000.
CMake does not check if the current system supports Wow64 before applying
these flags.

This commit adds a check for IsWow64Process in kernel32.dll before adding
these flags.

Author: Axel Gembe <f03c0a59c59454eea25ccc9b83f19b79a7c85f45@bastart.eu.org>
Signed-off-by: Axel Gembe <f03c0a59c59454eea25ccc9b83f19b79a7c85f45@bastart.eu.org>

biotrump/ITK,LucasGandel/ITK,LucHermitte/ITK,hinerm/ITK,msmolens/ITK,vfonov/ITK,paulnovo/ITK,heimdali/ITK,BRAINSia/ITK,stnava/ITK,hjmjohnson/ITK,biotrump/ITK,LucHermitte/ITK,hendradarwin/ITK,zachary-williamson/ITK,msmolens/ITK,CapeDrew/DITK,itkvideo/ITK,wkjeong/ITK,CapeDrew/DITK,Kitware/ITK,CapeDrew/DITK,cpatrick/ITK-RemoteIO,BlueBrain/ITK,zachary-williamson/ITK,eile/ITK,PlutoniumHeart/ITK,fuentesdt/InsightToolkit-dev,hjmjohnson/ITK,daviddoria/itkHoughTransform,fedral/ITK,malaterre/ITK,spinicist/ITK,hinerm/ITK,BRAINSia/ITK,malaterre/ITK,blowekamp/ITK,zachary-williamson/ITK,PlutoniumHeart/ITK,malaterre/ITK,itkvideo/ITK,jmerkow/ITK,msmolens/ITK,paulnovo/ITK,msmolens/ITK,BlueBrain/ITK,LucHermitte/ITK,richardbeare/ITK,blowekamp/ITK,hinerm/ITK,jcfr/ITK,CapeDrew/DITK,jcfr/ITK,eile/ITK,InsightSoftwareConsortium/ITK,fedral/ITK,fedral/ITK,fuentesdt/InsightToolkit-dev,biotrump/ITK,malaterre/ITK,vfonov/ITK,jcfr/ITK,hinerm/ITK,heimdali/ITK,eile/ITK,rhgong/itk-with-dom,jmerkow/ITK,LucHermitte/ITK,thewtex/ITK,CapeDrew/DITK,msmolens/ITK,vfonov/ITK,cpatrick/ITK-RemoteIO,fedral/ITK,thewtex/ITK,BRAINSia/ITK,fuentesdt/InsightToolkit-dev,spinicist/ITK,daviddoria/itkHoughTransform,malaterre/ITK,fuentesdt/InsightToolkit-dev,stnava/ITK,GEHC-Surgery/ITK,CapeDrew/DITK,spinicist/ITK,itkvideo/ITK,wkjeong/ITK,itkvideo/ITK,LucasGandel/ITK,hendradarwin/ITK,daviddoria/itkHoughTransform,zachary-williamson/ITK,jcfr/ITK,fedral/ITK,wkjeong/ITK,jmerkow/ITK,fbudin69500/ITK,jmerkow/ITK,richardbeare/ITK,atsnyder/ITK,spinicist/ITK,stnava/ITK,malaterre/ITK,cpatrick/ITK-RemoteIO,blowekamp/ITK,itkvideo/ITK,vfonov/ITK,heimdali/ITK,cpatrick/ITK-RemoteIO,hendradarwin/ITK,atsnyder/ITK,CapeDrew/DCMTK-ITK,LucHermitte/ITK,atsnyder/ITK,hinerm/ITK,fuentesdt/InsightToolkit-dev,GEHC-Surgery/ITK,jmerkow/ITK,LucasGandel/ITK,heimdali/ITK,InsightSoftwareConsortium/ITK,PlutoniumHeart/ITK,ajjl/ITK,hinerm/ITK,eile/ITK,ajjl/ITK,Kitware/ITK,eile/ITK,CapeDrew/DCMTK-ITK,itkvideo/ITK,eile/ITK,atsnyder/ITK,BRAINSia/ITK,rhgong/itk-with-dom,rhgong/itk-with-dom,cpatrick/ITK-RemoteIO,hjmjohnson/ITK,hinerm/ITK,stnava/ITK,stnava/ITK,fedral/ITK,ajjl/ITK,atsnyder/ITK,atsnyder/ITK,BRAINSia/ITK,jmerkow/ITK,blowekamp/ITK,eile/ITK,zachary-williamson/ITK,GEHC-Surgery/ITK,thewtex/ITK,CapeDrew/DCMTK-ITK,paulnovo/ITK,CapeDrew/DCMTK-ITK,GEHC-Surgery/ITK,GEHC-Surgery/ITK,thewtex/ITK,richardbeare/ITK,PlutoniumHeart/ITK,hjmjohnson/ITK,daviddoria/itkHoughTransform,blowekamp/ITK,blowekamp/ITK,CapeDrew/DCMTK-ITK,rhgong/itk-with-dom,GEHC-Surgery/ITK,zachary-williamson/ITK,atsnyder/ITK,fbudin69500/ITK,Kitware/ITK,malaterre/ITK,wkjeong/ITK,heimdali/ITK,fuentesdt/InsightToolkit-dev,richardbeare/ITK,atsnyder/ITK,thewtex/ITK,cpatrick/ITK-RemoteIO,fbudin69500/ITK,Kitware/ITK,msmolens/ITK,BlueBrain/ITK,biotrump/ITK,blowekamp/ITK,zachary-williamson/ITK,paulnovo/ITK,PlutoniumHeart/ITK,rhgong/itk-with-dom,wkjeong/ITK,fuentesdt/InsightToolkit-dev,hendradarwin/ITK,ajjl/ITK,malaterre/ITK,rhgong/itk-with-dom,fbudin69500/ITK,spinicist/ITK,hendradarwin/ITK,CapeDrew/DITK,CapeDrew/DCMTK-ITK,hjmjohnson/ITK,stnava/ITK,fbudin69500/ITK,thewtex/ITK,ajjl/ITK,paulnovo/ITK,jmerkow/ITK,zachary-williamson/ITK,richardbeare/ITK,jmerkow/ITK,hinerm/ITK,InsightSoftwareConsortium/ITK,LucasGandel/ITK,BlueBrain/ITK,BlueBrain/ITK,daviddoria/itkHoughTransform,spinicist/ITK,LucasGandel/ITK,fbudin69500/ITK,spinicist/ITK,jcfr/ITK,GEHC-Surgery/ITK,LucasGandel/ITK,CapeDrew/DCMTK-ITK,heimdali/ITK,msmolens/ITK,daviddoria/itkHoughTransform,BRAINSia/ITK,cpatrick/ITK-RemoteIO,vfonov/ITK,BlueBrain/ITK,ajjl/ITK,atsnyder/ITK,eile/ITK,heimdali/ITK,vfonov/ITK,zachary-williamson/ITK,hendradarwin/ITK,hendradarwin/ITK,heimdali/ITK,LucHermitte/ITK,InsightSoftwareConsortium/ITK,BlueBrain/ITK,rhgong/itk-with-dom,vfonov/ITK,jcfr/ITK,vfonov/ITK,daviddoria/itkHoughTransform,CapeDrew/DCMTK-ITK,daviddoria/itkHoughTransform,itkvideo/ITK,jcfr/ITK,jcfr/ITK,wkjeong/ITK,BlueBrain/ITK,richardbeare/ITK,fedral/ITK,fbudin69500/ITK,thewtex/ITK,blowekamp/ITK,InsightSoftwareConsortium/ITK,ajjl/ITK,CapeDrew/DCMTK-ITK,fuentesdt/InsightToolkit-dev,eile/ITK,hjmjohnson/ITK,GEHC-Surgery/ITK,PlutoniumHeart/ITK,Kitware/ITK,paulnovo/ITK,hjmjohnson/ITK,paulnovo/ITK,rhgong/itk-with-dom,fbudin69500/ITK,biotrump/ITK,LucasGandel/ITK,biotrump/ITK,biotrump/ITK,InsightSoftwareConsortium/ITK,itkvideo/ITK,wkjeong/ITK,hendradarwin/ITK,CapeDrew/DITK,wkjeong/ITK,hinerm/ITK,ajjl/ITK,cpatrick/ITK-RemoteIO,LucHermitte/ITK,PlutoniumHeart/ITK,LucasGandel/ITK,msmolens/ITK,vfonov/ITK,malaterre/ITK,Kitware/ITK,PlutoniumHeart/ITK,spinicist/ITK,stnava/ITK,InsightSoftwareConsortium/ITK,Kitware/ITK,stnava/ITK,biotrump/ITK,richardbeare/ITK,LucHermitte/ITK,fedral/ITK,CapeDrew/DITK,daviddoria/itkHoughTransform,spinicist/ITK,fuentesdt/InsightToolkit-dev,paulnovo/ITK,BRAINSia/ITK,stnava/ITK,itkvideo/ITK