Fixes the use of PostgreSQL-style casts with ORM (soci::values)

This is a fix for the issue #121