fix IndexError in internal_minima

Variable i was not initialized prior to its use in line 26.
Merge pull request #13 from humburg/patch-1

fix IndexError in internal_minima