iOS 8 and Safari 8 version 9223372036854776000 bug

This pull request fix an iOS 8 and Safari 8 bug. At the first db connection the oldVersion is equal to 9223372036854776000 (!?!) but the real value is 0.
Tested on mobile safari and Yosemite.