Synthesizing Adaptable Components for COTS Runtime Environments