Add conditional for Django 1.5 or 1.6 to override their version of WhereNode.as_sql