Make "host" connection parameter optional

Add a "host" component to the DSN only if $config array contains a "host" key

This fixes #1741