Generic injectivity of the X-ray transform