Evaluation of entanglement measures in spin systems with the random phase approximation