Check version using correct user

Version check fails if the correct user is not used (postgres on my system, the user root does not exist). By respecting the runas argument we avoid an error.
Merge pull request #3963 from GaretJax/patch-1

Check version using correct user