Fix a couple warnings detected on FreeBSD build.

This fixes a global and a pointer cast. Jung-uk Kim.