Add setting to disable p7m without extension behavior
(cherry picked from commit b95bc7997bc2e8d77a557ebeefe200685786de33)