Fix #1058: Allow exporting protected members

What about protected fields?