Stress intensity factors and the weight function for an elliptical crack