James Franco says acting helped him overcome certain addictions