Fix #1058: Allow exporting protected members

I would keep this change for 0.6.0, just in case (I know it's internal, but still).