[jvm-detection] use python2 import of winreg