Automated Synthesis of Application-layer Connectors from Automata-based Specifications