Unity 3.4 with 3.5 attributes

I can’t figure out how to use inspectors that support editing multiple objects while still being compatible with unity 3.4. I’ve made something that actually compiles, but the inspector falls back to default. I have no idea why, because the declaration is there, and it causes the custom inspector to show up when I don’t use a macro.

How do I use [CanEditMultipleObjects] without breaking Unity 3.4 compatibility?

macro declare_my_class:
    body = [|
        pass
    |]

    ifdef UNITY_3_4:
        yield [|
            [CustomEditor(MyClass)]
            class MyClassEditor (Editor):
                $body
        |]

    ifdef UNITY_3_5:
        yield [|
            [CustomEditor(MyClass), CanEditMultipleObjects]
            class MyClassEditor (Editor):
                $body
        |]

declare_my_class true

I managed to write something that works, but I’m not proud of it. I basically rewrote the thing to C# and dropped macro support.

using UnityEngine;
using UnityEditor;

#if UNITY_3_4
[CustomEditor(typeof(MyClass))]
#endif
#if UNITY_3_5
[CustomEditor(typeof(MyClass)), CanEditMultipleObjects]
#endif
public class MyClasseditor : Editor {
    // Lots of code here
}