British premier will accept an invitation by the bloc to discuss security matters, in the latest sign of improving relations