Refactors JRE uninstaller detection code