Fix karma module when karma target exists