Make option parsing more conformant to libpq behaviour.

Fixes #162