Rotating nonspherical masses and their effects on the precession of a gyroscope