fix slice function

the length property of returned value from slice function was wrong if start > 0
Merge pull request #4 from gyson/patch-1

fix slice function