Numerical evaluation of orientation averages and its application to molecular physics