Added explicit pointer cast.

Reported by Jaebum Shin.