Various fixes to the PostgreSQL Database support - still experimental
Now it builds more automated (if postgresql is found it will enable support for postgresql)