make mailer context compatible with SwiftMailerBundle v2.3.3 and v2.2.5