Fix compilation problem for sqlite versions between 3.5.0-3.7.7. ROOT-5318.

Patch provided by Oliver Freyermuth.