Generating entanglement with low-Q-factor microcavities