def compile_varbinary(element, compiler, **kw):
    """Compiler function to handle VARBINARY(max).
    
    Should be removed when SQLAlchemy supports this natively.
    """
    if str(element.length).lower() == 'max':
        return "VARBINARY(max)"
    else:
        return compiler.visit_VARBINARY(element, **kw)