Efficient approximation of the stationary solution to the chemical master equation