Optimal mean-square performance for networked control systems with unreliable communication