Cast allocation to avoid compiler warnings.
Merge pull request #85 from dominikgrewe/cast_alloc

Cast allocation to avoid compiler warnings.