Fix support for 'psycopg2' library.