Fix Issue 5310 - Variant == const(Variant) doesn't compile

http://d.puremagic.com/issues/show_bug.cgi?id=5310

This is a bit brutal. I have a few alternative approaches in mind but this is a stopgap.