Approximating graph-constrained max-cut