Fix idAttribute for collection
Fix Safari 8 and iOS8

at the first connection oldVersion is equal to 9223372036854776000 but
the real value is 0.