Three-dimensional simulations of protostellar jets