Changed connect to async use of libpq on non-Windows OSes