A feasible direction algorithm for general nonlinear semidefinite programming