Fixes #3: PG compatibility, tested on Travis
Fixes ActiveRecord 2.3 compatibility
Merge pull request #4 from mezis/pg-compatibility

PostgreSQL compatibility