Added OS detection
Added workaround for bug in postgresql9.2 on oracle