Global differential equations for slice regular functions