Regularity of extremal solutions of semilinear elliptic problems with non-convex nonlinearities on general domains