Robust entanglement of a micromechanical resonator with output optical fields