Fix #1058: Allow exporting protected members

Is the same in terms of how its tested in the compiler. But I can add a test if you want.