INT-3516: Fix `StubJavaMailSender` for SF 4.1.1 compatibility