Postgres distutil

The LooseVersion is not imported with just distutils. I also converted to compare 2 LooseVersions instead of comparing them piece-by-piece.