Regularity of the derivatives of solutions to certain degenerate elliptic equations