Support sandbox in Django < 1.5

Wrap the custom user classes in a conditional block.