Use SpecialPowers in place of switch_to_frame for getting and setting settings

This addresses issue #365